package com.yvon.service.demo.spring.beans.factory.config;

import com.yvon.service.demo.spring.beans.PropertyValues;

/**
 * bean定义类
 * 用于记录bean的信息
 *
 * @author Yvon
 * @since 2022-11-24
 */
public class BeanDefinition {

    /**
     * bean类
     */
    private Class beanClass;

    /**
     * 属性值(列表)
     */
    private PropertyValues propertyValues;

    public BeanDefinition(Class beanClass) {
        this.beanClass = beanClass;
        this.propertyValues = new PropertyValues();
    }

    public BeanDefinition(Class beanClass, PropertyValues propertyValues) {
        this.beanClass = beanClass;
        this.propertyValues = propertyValues != null ? propertyValues : new PropertyValues();
    }

    public Class getBeanClass() {
        return beanClass;
    }

    public PropertyValues getPropertyValues() {
        return propertyValues;
    }

    public void setBeanClass(Class beanClass) {
        this.beanClass = beanClass;
    }

    public void setPropertyValues(PropertyValues propertyValues) {
        this.propertyValues = propertyValues;
    }
}
